"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.res = void 0;
require("core-js/modules/es.array.iterator.js");
require("core-js/modules/es.array.reduce.js");
require("core-js/modules/web.dom-collections.iterator.js");
var babel = require("@babel/core");
var sourceCode = `[1,2,3].map(n=>n*n)`;

//使用API方式选择插件或者预设
var opt = {
  presets: [],
  Plugins: ["@babel/plugin-transform-arrow-functions"]
};
babel.transform(sourceCode, opt, (err, result) => {
  console.log("结果是" + result);
});

// const app = () => {
//     const greeting = 'World' ?? 'Tony'
//     return <div>
//       {`Hello,${greeting}`}
//     </div>
//   }
var res = exports.res = [[0, 1, 2].reduce((prev, current) => prev + current, 0)];
console.log(...res);